package com.way.Java多线程编程核心技术v2.chapter02_对象及变量的并发访问._2_1_synchronized同步方法.脏读;

/**
 * @PROJECT_NAME: my-projects
 * @DESCRIPTION:
 * @USER: 魏彪
 * @DATE: 2023/11/28 16:19
 */
public class Test01 {
    public static void main(String[] args) {
        PublicVar var = new PublicVar();
        ThreadA a = new ThreadA(var);
        a.start();

        try {
            Thread.sleep(200);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }

        var.getValue();
    }
}
